package com.tao.mapper;

import com.tao.pojo.entity.SetmealProduct;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

@Mapper
public interface SetmealProductMapper {
    @Insert("insert into setmeal_product (id, setmeal_id, product_id, copies) VALUE (#{id},#{setmealId},#{productId},#{copies})")
    void addSetmealProduct(SetmealProduct setmealProduct);


    List<SetmealProduct> getBySetmealId(Integer id);

    @Delete("delete from setmeal_product where setmeal_id=#{id}")
    void deleteSetmealBySetmealId(Integer id);
}
